<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('indexadmin/index')}">{:L('USER_INDEXADMIN_INDEX')}</a></li>
			<li class="active"><a>资料审核</a></li>
		</ul>
        <form class="form-horizontal js-ajax-form" action="{:U('indexadmin/examine_act',array('display'=>0))}" method="post">
			<fieldset>
				<div class="tabbable">
					<div class="tab-content">
						
							<fieldset>
								<div class="control-group">
									<label class="control-label">姓名</label>
									<div class="controls">
										<input type="text" name="options[name]" value="{$user.name}"><span class="form-required"> 
										<input type="hidden" name="options[id]" value="{$user.id}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">手机号码</label>
									<div class="controls">
									<php>
										if($group==6){
											$mob=substr($user['mobile'],0,3).'****'.substr($user['mobile'],-4);
										}else if($group==3 || $group==8 || $group==10){
											if($user['account_status']!=0){
												$mob=substr($user['mobile'],0,3).'****'.substr($user['mobile'],-4);
											}else{
												$mob=$user['mobile'];
											}
										}else{
											$mob=$user['mobile'];
										}
										</php>
										<input type="text" name="options[mobile]" value="{mob}"><span class="form-required">{$user.mob_name}</span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">身份证</label>
									<div class="controls">
										<input type="text" name="options[identity]" value="{$user.identity}">
									</div>
								</div>
								
								<div class="control-group">
									<label class="control-label">证件照</label>
									<div class="controls">
										<notempty name="user.url">
											<a href="javascript:parent.image_preview_dialog('{:sp_get_image_preview_url_qk($user['url'])}',420,420);">
												<i class="fa fa-photo fa-fw"></i>
											</a>
										</notempty>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">银行卡号</label>
									<div class="controls">
									<php>
										if($group==6){
											$mob=substr($user['silver_number'],0,3).'****'.substr($user['silver_number'],-4);
											$silver_card='********';
										}else if($group==3 || $group==8 || $group==10){
											if($user['account_status']!=0){
												$mob=substr($user['silver_number'],0,3).'****'.substr($user['silver_number'],-4);
												$silver_card='********';
											}else{
												$mob=$user['silver_number'];
												$silver_card=$user['silver_card'];
											}
										}else{
											$mob=$user['silver_number'];
											$silver_card=$user['silver_card'];
										}
										</php>
									<input type="text" name="options[silver_card]" value="{$silver_card}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">注册时间</label>
									<div class="controls">
										<label class="control-label" style="width:auto">{$user.crtime}</label>
									</div>
								</div>
							</fieldset>
					</div>
				</div>

				<div class="form-actions">
					<button class="btn btn-primary js-ajax-submit" type="submit" data-types='1' data-action="{:U('indexadmin/examine_act',array('display'=>1))}" data-msg='审核确定通过?' data-subcheck="true">审核通过</button>
				<button class="btn btn-primary js-ajax-submit" type="submit" data-types='0' data-msg='审核确定不通过?' data-subtype='true' data-subcheck="true">审核不通过</button>
				</div>
			</fieldset>
		</form>
		
	</div>
	
</body>
<script type="text/javascript">
	var ajaxForm_list = $('form.js-ajax-form');
	if (ajaxForm_list.length) {
	    Wind.use('ajaxForm', 'artDialog', function () {
			
	        $('button.js-ajax-submit').bind('click', function (e) {

	            e.preventDefault();
	            /*var btn = $(this).find('button.js-ajax-submit'),
						form = $(this);*/
	            var btn = $(this),
	                form = btn.parents('form.js-ajax-form');
	
	            //批量操作 判断选项
	            if (btn.data('subcheck')) {
	                btn.parent().find('span').remove();
					var msg = btn.data('msg');
					if (msg) {
						art.dialog({
							id: 'warning',
							icon: 'warning',
							content: btn.data('msg'),
							cancelVal: "{:L('CLOSE')}",
							cancel: function () {
								
							},
							button :[ {
											name : "{:L('OK')}",
											callback:function(){
												ajaxSubmit(btn.data('types'));
											},
											focus : true
									} ]
						});
					} else {
						btn.data('subcheck', false);
						btn.click();
					}
	                return false;
	            }
	        });
	
	    });
	}
	function ajaxSubmit(type){
			var btn = $('button.js-ajax-submit'),
			form = btn.parents('form.js-ajax-form');
			form.ajaxSubmit({
	                url: type ? btn.data('action') : form.attr('action'),
	                //按钮上是否自定义提交地址(多按钮情况)
	                dataType: 'json',
	                beforeSubmit: function (arr, $form, options) {
						var tx=type ? '审核通过' : '审核不通过';
	                    //按钮文案、状态修改
	                    btn.text(tx + '中...').attr('disabled', true).addClass('disabled');
	                },
	                success: function (data, statusText, xhr, $form) {
	                    //按钮文案、状态修改
	                    btn.removeClass('disabled').parent().find('span').remove();
	
	                    if (data.state === 'success') {
	                        $('<span class="tips_success">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('slow').delay(1000).fadeOut(function () {
	                            if (data.referer) {
	                                //返回带跳转地址
	                                if (window.parent.art) {
	                                    //iframe弹出页
	                                    window.parent.location.href = data.referer;
	                                } else {
	                                    window.location.href = data.referer;
	                                }
	                            } else {
	                                if (window.parent.art) {
	                                    reloadPage(window.parent);
	                                } else {
	                                    //刷新当前页
	                                    reloadPage(window);
	                                }
	                            }
	                        });
	                    } else if (data.state === 'fail') {
	                        $('<span class="tips_error">' + data.info + '</span>').appendTo(btn.parent()).fadeIn('fast');
	                        btn.removeProp('disabled').removeClass('disabled');
	                    }
	                }
	            });
	}
	</script>
</html>